from django import template
from django.conf import settings
from django.utils import safestring

register = template.Library()

@register.simple_tag
def render_css(path):
  return safestring.mark_safe(
    '<link rel="stylesheet" type="text/css" href="%s/css/%s" />' 
    % (settings.MEDIA_URL, path)
  )

@register.simple_tag
def render_js(path):
  return safestring.mark_safe(
    '<script type="text/javascript" src="%s/js/%s" />'
    % (settings.MEDIA_URL, path)
  )
  